/*
 * @Autor: dingxiaolin
 * @Date: 2021-06-02 13:12:43
 * @LastEditors: dingxiaolin
 * @LastEditTime: 2021-07-23 13:49:48
 */
import { createStorage } from '@/utils/Storage'
import { ACCESS_TOKEN } from '@/store/mutation-types'
const Storage = createStorage({ storage: sessionStorage })

export type IUserState = {
    token: string
    roles: any[]
    info: object
    apps: any[],
    userInfo: any
}

export const state: IUserState = {
    token: Storage.get(ACCESS_TOKEN, ''),
    roles: [],
    info: {},
    apps: [],
    userInfo: {}
}
